﻿@model CNRegex.Web.Utility.PaginateHelper

@{
		string pageIndexAlia=string.IsNullOrEmpty(Model.ParaPageIndex) ? "pageIndex" : Model.ParaPageIndex;
  }
@if (Model.TotalPages==0)
{
	@Model.EmptyTip
}
else
{
	
	<ul id="pagination-flickr">
		@if (Model.HasPreviousPage)
	 {
			 <li class="next">
				<a href="@(Model.Url)@(pageIndexAlia)=@(Model.PageNo - 1)">«上一页</a>
			</li>
	 }
	 else
	 {
			 <li class="previous-off">«上一页</li>
	 }
	
		@for (int i = 0; i < Model.TotalPages; i++)
	 {
		 if (Model.PageNo == i)
		 {
			<li class="active">@(i + 1)</li>
		 }
		 else
		 {
			<li><a href="@(Model.Url)@(pageIndexAlia)=@i">@(i + 1)</a></li> 
		 }
	 }

		@if (Model.HasNextPage)
	  {
			 <li class="next">
				<li class="next"><a href="@(Model.Url)@(pageIndexAlia)=@(Model.PageNo + 1)">下一页 »</a> </li>
			</li>
	  }
	  else
	  {
			<li class="previous-off">下一页 »</li>
	  }
	
	</ul>
}

